package com.briup.cms.web.controller;

import com.briup.cms.bean.BaseLog;
import com.briup.cms.service.IBaseLogService;
import com.briup.cms.utils.Message;
import com.briup.cms.utils.MessageUtil;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags="日志相关接口")
@RestController
@RequestMapping("/auth/log")
public class BaseLogController {
	
	@Autowired
	private IBaseLogService baseLogService;
	
	@ApiOperation(value = "分页查询日志信息")
    @ApiImplicitParams({
        @ApiImplicitParam(name = "pageNum", value = "当前页", required = true, paramType = "query"),
        @ApiImplicitParam(name = "pageSize", value = "每页大小", required = true, paramType = "query"),
	})
    @GetMapping("pageQuery")
    public Message pageQuery(int pageNum, int pageSize){
       PageInfo<BaseLog> data = baseLogService.pageQuery(pageNum, pageSize);
       return MessageUtil.success(data);
    }

}
